import os

cwd = os.getcwd()
dir_list = os.listdir(cwd)

file_list = []
print 'list all files'

for filename in dir_list:
    if filename.rfind('py')>=0:
        print '             ', filename
        file_list.append(filename)
